﻿using IShoppingBll;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace APIShoppingSystem.Controllers
{
	[Route("api/[controller]/[action]")]
	[ApiController]
	public class Top_upController : ControllerBase
	{
		private ITop_upBll _top_UpBll;

		public Top_upController(ITop_upBll top_UpBll)
		{
			_top_UpBll = top_UpBll;
		}
        /// <summary>
        /// 充值金额记录页面展示
        /// </summary>
        /// <param name="page"></param>
        /// <param name="limit"></param>
        /// <param name="Amount"></param>
        /// <param name="UserId"></param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetTop_upList(int page, int limit, string UserId)
        {
            int count;

            object top_ups = _top_UpBll.GetTop_upListByPage(page, limit, out count, UserId);

            return new JsonResult(new
            {
                code = 0,
                msg = "成功",
                count = count,
                data = top_ups
            });
        }
    }
}
